home *** CD-ROM | disk | FTP | other *** search
- Path: erich.triumf.ca!bennett
- From: bennett@erich.triumf.ca (P.Bennett)
- Newsgroups: comp.lang.c
- Subject: Re: How to display numbers in Borland C graphics
- Date: 22 Jan 1996 08:17 PST
- Organization: TRIUMF: Tri-University Meson Facility
- Distribution: world
- Message-ID: <22JAN199608175437@erich.triumf.ca>
- References: <4e0a1a$b5h@tst.hk.super.net>
- NNTP-Posting-Host: erich.triumf.ca
- News-Software: VAX/VMS VNEWS 1.50
-
- In article <4e0a1a$b5h@tst.hk.super.net>, chiasw@hk.super.net writes...
- >HELP:
- >
- >I am a novice in C programming. I found that Borland C graphics function only
- >accepts text string for display during graphics mode. How can I display
- >some calculated values in graphics mode (i.e. to display numerical values di
- >rectly in graphics mode?
- >
- >Alternately, is there any quick way to convert numerical value into a st ring for
- >display by graphics function?
-
- Use sprintf() to "print" the numbers to a char array, then use the text display
- function to put that string on the screen.
-
- sprintf() works just like printf(), except that it puts its output in a char
- array.
-
- Peter Bennett VE7CEI | Vessels shall be deemed to be in sight
- Internet: bennett@triumf.ca | of one another only when one can be
- Packet: ve7cei@ve7kit.#vanc.bc.ca | observed visually from the other
- TRIUMF, Vancouver, B.C., Canada | ColRegs 3(k)
- GPS and NMEA info and programs: ftp://sundae.triumf.ca/pub/peter/index.html
-
-
-
-
-
-